/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package service.enumerations;

/**
 *
 * @author chapmand
 */
public enum WarehouseIngredient {
	MALT_AND_ADJUNCTS(100), HOPS(110), YEAST(120), SPICES_AND_FLAVORINGS(130)
        , LABELS(140), PACKAGING(150), CONSUMABLES(160);

	private final int dbId;

	private WarehouseIngredient(final int dbId) {
		this.dbId = dbId;
	}

	public int getDbId() {
		return dbId;
	}

	public static WarehouseIngredient create(final int id) {
		switch (id) {
		case 100:
			return WarehouseIngredient.MALT_AND_ADJUNCTS;
		case 110:
			return WarehouseIngredient.HOPS;
		case 120:
			return WarehouseIngredient.YEAST;
		case 130:
			return WarehouseIngredient.SPICES_AND_FLAVORINGS;
                case 140:
                        return WarehouseIngredient.LABELS;
                case 150:
                        return WarehouseIngredient.PACKAGING;
                case 160:
                        return WarehouseIngredient.CONSUMABLES;
		default:
			return null;

		}
	}
}
